package com.itestor.iptv.global.actions;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang.StringUtils;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import com.itestor.iptv.global.GlobalConstant;

public class FrameWrappingAction extends Action {

	public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
		String url = request.getParameter("url");
		if (StringUtils.isEmpty(url)) {
			return null;
		}
		request.setAttribute(GlobalConstant.REQUEST_ATTR_FRAME_URL, url);

		return mapping.findForward(GlobalConstant.FORWARD_SUCCESS);
	}
}
